#include <iostream>
using std::boolalpha;
#include "String.cpp"
int main()
{
	String s1("Happy");
	String s2(" Birthday");
	String s3;
	std::cout<<"s1= "<<s1<<" s2= "<<s2<<" s3= "<<s3<<"\n"<<boolalpha;
	std::cout<<"The result comparing s2 and s1 is";
	std::cout<<"\ns2==s1="<<(s2==s1);

	std::cout<<"\ns2>s1="<<(s2>s1);
	std::cout<<"\ns2<s1="<<(s2<s1);
	std::cout<<"\ns2>=s1="<<(s2>=s1);
	std::cout<<"\ns2<=s1="<<(s2<=s1);
	if(!s3)
	{
		std::cout<<"s3 este gol";
		s3=s1;
		std::cout<<"s3 este"<<s3;
	}
	std::cout<<"\n s1+=s2=";
	s1+=s2;
	std::cout<<s1;
	std::cout<<"\ns1+=\"Dani\"";
	s1+="Dani";
	std::cout<<"s1="<<s1<<"\n\n";
	std::cout<<"\nthe substring of s1(0,14)"<<s1(0,14);
	std::cout<<"\ns1(4)"<<s1(4);
	String *s4Ptr=new String(s1);
	std::cout<<"\n s4ptr="<<*s4Ptr<<"\n\n";
	std::cout<<"assingning *s4Ptr to *s4Ptr"<<"\n";
	*s4Ptr=*s4Ptr;
	std::cout<<"*s4Ptr= "<<*s4Ptr;
	delete s4Ptr;
	s1[0]='H';
	s1[6]='B';
	std::cout<<"\ns1 after s1[0]= 'H' and s1[6]='B'"<<s1<<"\n";
	std::cout<<"attempt to assig 'd' to s1[30]";
	s1[30]='d';
return 0;
}
